import pygame
image=pygame.image.load("monkeyjar.bmp")
image.set_colorkey((255,0,255))
import AbstractContainer

class MonkeyJar(AbstractContainer.AbstractContainer):
	def __init__(self,x=0,y=0,mass=20):
		AbstractContainer.AbstractContainer.__init__(self,x=x,y=x,mass=mass)
	def getWidth(self):
		return image.get_width()
	def getHeight(self):
		return image.get_height()
	def drawingInformation(self):
		im=image
		return (self.x-0.5*self.getWidth(),self.y+self.getHeight()),im
	def revaelContained(self):
		import random
		import Collectable
		import FroggyFog
		import Snake
		f=random.randint(0,5)
		if f==0:
			print 'empty'
		elif f==1:
			self.cur_room.collectablesList.append(Collectable.Collectable(x=self.x,y=self.y))
		elif f<=4:
			fog=FroggyFog.FroggyFog(x=self.x,y=self.y)
			fog.cur_room=self.cur_room
			self.cur_room.projectilesList.append(fog)
		elif f==5:
			snake=Snake.Snake(x=self.x,y=self.y)
			self.cur_room.addAnotherCharacter(snake)
	def physicalDamageTaken(self,amount):
		self.die()
		return amount
